[Unit]
Description=Health Check Timer for Failover System
Documentation=man:systemd.timer(5)
Requires=health-check.service

[Timer]
# 定时执行配置
OnBootSec={{ failover_check_on_boot | default('5min') }}
OnUnitActiveSec={{ failover_check_interval | default('2min') }}

# 随机延迟，避免多个服务同时执行
RandomizedDelaySec={{ failover_random_delay | default('30sec') }}

# 持久化定时器，即使系统关机也会在下次启动时执行错过的任务
Persistent={{ failover_persistent | default('true') }}

# 精确性配置
AccuracySec={{ failover_accuracy | default('1min') }}

[Install]
WantedBy=timers.target